package mylibrary.com.thinking.java.chapter5;

public class OptionalTrailArguments {

	static void f(int required, String... trailing) {
		
		System.out.print(trailing.length);
		System.out.print("required: " + required + " ");
		for(String s:trailing) {
			System.out.print(s + " ");
		}
		System.out.println();
	}
	
	public static void main(String[] args) {
		f(1, "one");
		f(2, "one", "two");
		f(0);
		f(3, "one", "two", "three");
		
	}
}
